package com.sfd.message.remind.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.sfd.message.remind.constant.enums.FestivalDefaultType;
import lombok.Data;

/**
 * @author haden
 * @date 2022/9/7 15:22
 **/
@Data
public class FestivalDefault {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 日期: yyyy-MM-dd
     */
    private String date;

    /**
     * 节日名称
     */
    private String name;

    private Integer type;

    public FestivalDefault() {
    }

    public static FestivalDefault FestivalDefaultPub(String date, String name) {
        FestivalDefault festivalDefault = new FestivalDefault();
        festivalDefault.setDate(date);
        festivalDefault.setName(name);
        festivalDefault.setType(FestivalDefaultType.publication.getKey());
        return festivalDefault;
    }

    public static FestivalDefault FestivalDefaultChines(String date, String name) {
        FestivalDefault festivalDefault = new FestivalDefault();
        festivalDefault.setDate(date);
        festivalDefault.setName(name);
        festivalDefault.setType(FestivalDefaultType.chines.getKey());
        return festivalDefault;
    }
}
